<?xml version="1.0" encoding="UTF-8" ?>
<html xmlns="http://www.w3.org/1999/xhtml"   
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:composite="http://java.sun.com/jsf/composite">
    
    <composite:interface>        	
    </composite:interface>
	
	<composite:implementation>			
		<h:outputScript library="js" name="jquery-1.7.1.min.js" target="head" />
		<h:outputStylesheet name="ticker.css" library="css" />
		<f:event listener="#{tickerBean.fillList}" type="preRenderView" />
		<script>
			function tick(){
				$('#ticker li:first').slideUp( function () { 
					$(this).appendTo($('#ticker')).slideDown(); 
					});
				}
			setInterval(function(){ tick () }, 8000);
		</script>
		
		<ul id="ticker">
			<ui:repeat var="row" value="#{tickerBean.noticesList}" varStatus="status">
				<li>
					<b>#{row.date} - #{row.title} </b><br />
					#{row.detail}
				</li>
			</ui:repeat>
		</ul>			
							
	</composite:implementation>
	
</html>